import request from '@/utils/request'

export function getdatelist(params) {
    return request({
        url: '/sys/role',
        params
    })
}

export function editRoleApi(data) {
    return request({
        url: `/sys/role/${data.id}`,
        method: 'PUT',
        data
    })
}

// 新增角色
export function addRoleApi(data) {
    return request({
        url: '/sys/role',
        method: 'POST',
        data
    })
}

// 删除角色
export function delRoleApi(id) {
    return request({
        url: `/sys/role/${id}`,
        method: 'DELETE'
    })
}
export function getcompantid(id) {
    return request({
        url: `/company/${id}`,
        method: 'GET',
    })
}
